<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/resources/plugins/jquery-easyui-1.5/themes/default/easyui.css' />" />
    <link rel="stylesheet" type="text/css" href="<@spring.url '/resources/plugins/jquery-easyui-1.5/themes/icon.css' />" />
    <!--webUploader-->
    <link href="<@spring.url '/resources/plugins/webuploader-0.1.5/webuploader.css' />" rel="stylesheet"/>
    <script src="<@spring.url '/resources/plugins/adminex/js/jquery-1.10.2.min.js' />"></script>
    <!--webUploader-->
    <script src="<@spring.url '/resources/plugins/webuploader-0.1.5/webuploader.min.js' />"></script>
    <script type="text/javascript" src="../internal.js"></script>
    <link rel="stylesheet" type="text/css" href="attachment.css"/>
</head>
<body>
<div class="wrapper">
    <div style="padding: 10px 0 10px 10px;">
        <div class="btns">
            <div id="${f.field}_picker"
                 server="<@spring.url '/wcm/common/resource/upload.do' />"
                 class="jr-upload">附件上传
            </div>
        </div>
    </div>
    <div class="fieldset flash" id="fsUploadProgress"></div>
</div>

<script src="<@spring.url '/resources/plugins/json2.js' />"></script>
<!--jqueryEasyUI-->
<script src="<@spring.url '/resources/plugins/jquery-easyui-1.5/jquery.easyui.min.js' />"></script>
<script src="<@spring.url '/resources/plugins/jquery-easyui-1.5/locale/easyui-lang-zh_CN.js' />"></script>
<script src="<@spring.url '/resources/js/easyui.js' />"></script>
<script type="text/javascript" src="callbacks.js"></script>
<script type="text/javascript" src="fileTypeMaps.js"></script>
<script type="text/javascript">
	var filesList = [];
	function attCallback(file){
		filesList.push(file);
	}
    window.onload = function () {
    	 var map = fileTypeMaps;
        //点击OK按钮
        dialog.onok = function(){
        	str="";
            for(var i=0,ci;ci=filesList[i++];){
                //需要在原文件（全名）中去掉后缀名
                var oldName = ci.oldName;
                if(oldName.indexOf(ci.extName)>0){
                    oldName = oldName.substring(0,oldName.length-ci.extName.length-1);
                }
                str += "<a href='/core/control/common/down.jsp?filename="+ ci.fullPath+"&title="+oldName+"' target='_blank'>" + ci.oldName + "</a>";
            }
            editor.execCommand("insertHTML",str);
        };
        dialog.oncancel = function(){
        	
        }
    };
</script>

</body>
</html>
